<template>
   <div>
    <el-form-item label="提示文字">
      <el-input size="default" v-model="modelValue.placeholder" placeholder="请设置提示语"/>
    </el-form-item>
    <el-form-item label="是否多选">
      <el-switch v-model="modelValue.multiple"></el-switch>
    </el-form-item>
    <el-form-item label="备选模式">
      <el-switch v-model="modelValue.expansion"></el-switch>
    </el-form-item>
    <el-form-item label="选项" v-if="modelValue.expansion">
      <el-button size="small" type="primary" icon="el-icon-plus" round @click="add">添加</el-button>
      <org-items v-model="modelValue.options" />
    </el-form-item>
    <org-picker title="请选择部门备选项" multiple type="dept" ref="orgPicker" :selected="modelValue.options" @ok="selected"/>
  </div>
</template>

<script>
import { ref } from 'vue';
import ConfigMinxins from "./ConfigMinxins";
import OrgItems from '/@/views/setting/workflow/process/OrgItems.vue'

export default {
    name: 'DeptPickerConfig',
    mixins: [ConfigMinxins],
    components: {
        OrgItems
    },
    setup() {
        const orgPicker = ref()
        const add = () => {
            orgPicker.value.show()
        }
        return {
            orgPicker,
            add
        }
    }
}
</script>

<style>

</style>